interface PaymentStratege{
  pay(money: number): void
}

class Order{
  money: number
  type: PaymentStratege

  constructor(money: number, type: PaymentStratege){
    this.money = money
    this.type = type
  }

  show(){
    this.type.pay(this.money)
  }
}

class AliPay implements PaymentStratege{
  pay(money: number): void {
      console.log(`AliPay: ${money}`)
  }
}

class WeChatPay implements PaymentStratege{
  pay(money: number): void {
      console.log(`WeChatPay: ${money}`)
  }
}

let a = new Order(100, new AliPay())
let b = new Order(200, new WeChatPay())

a.show()
b.show()
